<template>
  <div class="bottom-bar">
    <div class="left">
      <div>
        <img src="~assets/img/one.png" class="image service" alt="">
        <span class="text">客服</span>
      </div>
      <div>
        <img src="~assets/img/two.png" class="image shop" alt="">
        <span class="text">店铺</span>
      </div>
      <div>
        <img src="~assets/img/three.png" class="image select" alt="">
        <span class="text">收藏</span>
      </div>
    </div>
    <div class="right">
      <div class="cart" @click="addCart">加入购物车</div>
      <div class="buy">购买</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailBottomBar",
  methods:{
    addCart(){
      this.$emit('addCart')
    }
  }
};
</script>

<style scoped>
.bottom-bar {
  height: 49px;
  background-color: #fff;
  position: fixed;
  bottom: -1px;
  left: 0;
  right: 0;
  display: flex;
  text-align: center;
}
.left {
  width: 50%;
}
.left,
.right {
  display: flex;
}
.left .image {
  display: block;
  width: 22px;
  height: 22px;
  margin: 5px 15px 1px;

}
.left .shop {
  background-position: 0 57px;
}
.left .service {
  background-position: 0 107px;
}
.text {
  font-size: 13px;
}
.cart {
  padding: 0px 12px;
  background-color: #fff737;
  text-align: center;
  color: #666;
  font-size: 16px;
  line-height: 49px;
}
.buy {
  padding: 0px 12px;
  background-color: var(--color-tint);
  text-align: center;
  color: #fff;
  font-size: 16px;
  line-height: 49px;
}
</style>